<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => "Old $a[API]",
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<section id="dreams">
	<h2>Dream journal</h2>
	<p>
		I dreamed I was trying to help a customer at the menu board.
		It was past midnight, and everyone wanted to go home.
		They were sending pizzas through the oven and boxing them because aside from the cooking, these pizzas were already made, and for some reason, they didn&apos;t want to throw away uncooked, unboxed pizzas, so they had to cook, cut, and box them first.
		I was still trying to sell stuff.
		I wasn&apos;t supposed to be, but I didn&apos;t want these cooked pizzas to just be thrown away if I could help it.
		The more I sold, the less waste there would be.
		We had a long line, and the customer I was currently helping kept trying to order something I couldn&apos;t quite make out.
		It sounded like they wanted a light sauce pizza, which would have to be custom made.
		We were supposedly closed.
		I couldn&apos;t take custom orders, I could just sort of sell what we had ready and hope the others were too distracted to notice what I was doing.
		But they kept telling me it wasn&apos;t a light sauce pizza they wanted, so I told them to pull up to they window, where I&apos;d be able to hear them better.
		It turns out they wanted a &quot;vlight crust&quot; pizza.
		When I didn&apos;t know what that was, they spelled out &quot;vlight&quot; letter by letter.
		Then they said they thought that at this particular pizza chain, we call them thin crust pizzas.
		At that point, I figured out what they were probably trying to say.
		They probably meant a &qout;very light crust&quot;, which some lazy employee might abbreviate as &quotl;v. light crust&quot; because they think it&apos;s too much effort to write the three more letters it&apos;d take to write the word &quot;very&quot;.
		This customer was then contracting it into a single syllable, saying &quot;vlight&quot; instead of &quot;v-light&quot;.
	</p>
	<p>
		I got caught by my workmates before I could get the pizza to them, but I figured I could get them their order because I&apos;d already taken it, then stop taking new orders like they wanted me to.
		I was having difficulty locating the pizza they wanted though.
		The warmer was full of oddball pizzas, such as ones with not enough peperoni and ones with no sauce at all.
		I woke up before I could locate a pizza that would fill their order.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			You make a good point about cleaner, simpler code.
			In a generic class, we aren&apos;t even concerned with specifics of the types it operates on.
			If we were, we wouldn&apos;t be able to write the generic class.
			We&apos;d need to write something more class-specific.
			So when writing a generic class, we keep things simple, not using any type-specific features, and in our code, it becomes pretty obvious what our class is supposed to be doing.
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<p>
		Between reading various things assigned to me in school, I worked on a compatibility layer to run <code>minestats</code> on Minetest 0.4.0.
		Again.
		I don&apos;t know what I did with the last compatibility layer I built.
		I probably deleted it once I thought I didn&apos;t need it, just like I did the compatibility layer before that.
		This time, unlike last time, I worked hard to make sure the compatibility layer was self-containing; that no extra code had to be added to the built-in scripts.
		It was a pain, especially due to the fact that some Minetest $a[API] functions have changed what parameters they have over the years.
		In particular, one function takes a string in Minetest 0.4.0, while it takes an array that includes said string in modern Minetest.
		<code>minestats</code> is built for modern Minetest&apos;s $a[API], and I needed to avoid changing that, but at the same time, I couldn&apos;t change the function because Minetest 0.4.0 calls it expecting it to take the arguments it defines it to take.
		I finally got a really hacky system in place that uses specifics about why <code>minestats</code> even needs to override that function to begin with as well as the fact that this development environment will only be used in single player mode.
		Add a second player or rename the one player, and this setup will fail hard.
		It works for development though, and that&apos;s what I need.
		The one thing I had to modify outside the compatibility layer was the dependency list of <code>minestats</code>; I had to add one.
		Just in case I accidentally commit that and add it to the repo, I&apos;ve named the compatibility layer mod <code>e9n5nbk8z0ydy3pqjcx6sfwbim5utt22m7mhppp5i6z6lb1cwvq1rci6yswwwch1</code>.
		It&apos;s random garbage, and I can safely tell anyone that reports the bug that the dependency file is junk and they should delete it.
		They might even think to do that on their own, after reading the error message.
		Almost no one is going to think that&apos;s the name of an actual mod though and try to locate it on the forums.
	</p>
	<p>
		Now I&apos;m pretty much where I was before.
		I&apos;ve got an outdated Minetest $a[API] that really can&apos;t handle anything of much complexity, user-interaction-wise.
		In fact, the entire premise of the new mod&apos;s interface falls apart.
		My only hope of getting the interface built is to create a special node players can interact with to see said interface.
		And even then, I&apos;m not sure it would work.
		The $a[API] documentation claims some of the important features to not yet be implemented, though they have already been documented at this point in Minetest&apos;s history.
		It doesn&apos;t matter whether it works or not though, as I&apos;m not defining such nodes.
		This is supposed to remain contained in the player&apos;s inventory menu, so they can use it wherever they go.
		Major changes to how the spells work will need to be done.
		They might even need to activate automatically based on some sort of event.
		In this manner, some or all spells relating to the oldest of Minetest Game&apos;s items may offer automated usage in the final product of my labours, where spells related to newer elements must be activated manually.
		Maybe I could use chat commands to activate spells though instead of using automatic spells.
		It&apos;d allow for more consistence with how I plan to build out the spell system.
		Another bizarre quirk that applies for now, though will be corrected as I move through Minetest&apos;s history, is that I can neither detect when changes made to the spell roster are made nor prevent invalid changes.
		I&apos;ll need to instead perform frequent checks and corrections.
		The automatic resetting of spell power when an item is swapped out will also have to be performed during these checks, instead of when the swap actually occurs.
	</p>
</section>
END
);
